<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <title>demo</title>
</head>

<body>
    <h1>欢迎光临！</h1>
    <span th:text="${#dates.format(new java.util.Date(),'YYYY-MM-dd')}">现在</span>
    <span th:text="${demo}"></span>
</body>

</html>